package hu.bme.aut.consulttime.server.entities;

import hu.bme.aut.consulttime.enums.ProjectType;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
@Entity
public class Project implements Serializable {
	
	private static final long serialVersionUID = 4L;
	
	@Id
	@GeneratedValue
	private long projectId;
	
	private String title;
	private ProjectType type;
	private String description;

	// Reference to Tutors
	@ManyToMany
	@JoinTable(name = "GuidedProjects")
	private List<Tutor> tutors = new ArrayList<Tutor>();

	// Reference to Teams
	@OneToMany(mappedBy = "project")
	private List<Team> teams = new ArrayList<Team>();

	public long getProjectId() {
		return projectId;
	}

	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public ProjectType getType() {
		return type;
	}

	public void setType(ProjectType type) {
		this.type = type;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Tutor> getTutors() {
		return tutors;
	}

	public void setTutors(List<Tutor> tutors) {
		this.tutors = tutors;
	}

	public List<Team> getTeams() {
		return teams;
	}

	public void setTeams(List<Team> teams) {
		this.teams = teams;
	}

}
